<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>把华氏度转换为摄氏度的函数</title>
</head>

<body>
    <h2>JavaScript 函数</h2>
    <p>本例调用函数把华氏度转换为摄氏度：</p>
    <p id="demo"></p>
    <script>
        function toCelsiue(f){
            return(5/9) * (f-32);
        }
        document.getElementById("demo").innerHTML = toCelsiue(86);
    </script>
</body>

</html>